﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnitOfWorkCore.Domain.Abstractions;
using UnitOfWorkCore.Domain.Events;

namespace UnitOfWorkCore.Domain.Entities
{
    [Table("Users")]
    public class User : Entity<Guid>, IAggregateRoot
    {
        public string UserName { get; set; }
        public User() { }
        public User(string UserName)
        {
            this.UserName = UserName;
            this.AddDomainEvent(new UserCreatedDomainEvent(this));
        }

    }
}
